package com.ja.inquiry.controller;

import com.ja.inquiry.pojo.SpareSelectVo;
import com.ja.inquiry.service.InquiryService;
import com.ja.inquiry.pojo.CreateInquiry;
import com.ja.inquiry.pojo.InquirySelectVo;
import com.ja.util.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * Created by 11936 on 2019/4/28.
 */

@RestController//声明是Controller
@CrossOrigin//跨域共享
@RequestMapping("inquiryList")//父级目录legalPerson/ofCurrentUser
public class InquiryController {
    @Autowired
    private InquiryService inquiryService;
    //inquirySheet/see
    @PostMapping("search")
    public ResultVo search(@RequestBody InquirySelectVo inquirySelectVo){
        return inquiryService.search(inquirySelectVo);
    }

    @PostMapping("selectMaterial")
    public ResultVo selectMaterial(@RequestBody SpareSelectVo spareSelectVo){
        return inquiryService.selectMaterial(spareSelectVo);
    }

    @PostMapping("add")
    public ResultVo addInquiry(@RequestBody CreateInquiry createInquiry){
        return inquiryService.addInquiry(createInquiry);
    }

}
